import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import { LoadingOutlined, PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import {
  Layout,
  Tree,
  Row,
  Col,
  Radio,
  Select,
  Button,
  message,
  Table,
  Divider,
  Input,
  Modal,
  InputNumber,
} from 'antd';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import Authorized from '@/utils/Authorized';
import StandardTable from '@/components/StandardTable';
import styles from '@/utils/utils.less';
import DictCode from '../../components/DictCode';
import HOCSelect from '@/components/AntDesign/Select';

const { Sider, Content } = Layout;
const { TreeNode } = Tree;
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
const { Option } = Select;

@connect(({ paramset, loading }) => ({
  paramset,
  loading: loading.effects['paramset/fetchComList'],
}))
@Form.create()
class List extends PureComponent {
  state = {
    disSave: true, // 保存按钮是否可点击
    autoExpandParent: true,
    defaultkey: [],
    selectedRows: [],
    selectedRowKeys: [],
    insurance: [
      {
        id: 'birthAddEndDate',
        value: '生育增员截止日',
        valueDedu: 'birthDeduEndDate',
        idDedu: '生育减员截止日',
      },
      {
        id: 'pensAddEndDate',
        value: '养老增员截止日',
        valueDedu: 'pensDeduEndDate',
        idDedu: '养老减员截止日',
      },
      {
        id: 'medAddEndDate',
        value: '医疗增员截止日',
        valueDedu: 'medDeduEndDate',
        idDedu: '医疗减员截止日',
      },
      {
        id: 'injAddEndDate',
        value: '工伤增员截止日',
        valueDedu: 'injDeduEndDate',
        idDedu: '工伤减员截止日',
      },
      {
        id: 'unempAddEndDate',
        value: '失业增员截止日',
        valueDedu: 'unempDeduEndDate',
        idDedu: '失业减员截止日',
      },
    ],
    operSet: [
      {
        id: 1,
        value: '养老设置',
        prop: 'pensSet',
      },
      {
        id: 2,
        value: '医疗设置',
        prop: 'medSet',
      },
      {
        id: 3,
        value: '生育设置',
        prop: 'birthSet',
      },
      {
        id: 4,
        value: '失业设置',
        prop: 'unempSet',
      },
      {
        id: 5,
        value: '工伤设置',
        prop: 'injSet',
      },
    ],
    isSelMkuProp: false,
    mkupPayBaseRuleFlag: false,
    mkupPayPropRuleFlag: false,
    mkupPayCarryRuleFlag: false,
  };

  componentDidMount() {
    const { dispatch } = this.props;
    // 获取字典值
    dispatch({
      type: 'paramset/fetchDictList',
      payload: ['YES_NO_FLAG', 'CLCTNPLCY', 'DECL_PLCY', 'BILL_GEN_PLCY', 'OPER_SET'],
    });

    dispatch({
      type: 'paramset/fetchComList',
      payload: {},
    }).then(res => {
      if (res.length) {
        this.setState({
          defaultkey: [res[0].corpId],
        });
        setTimeout(() => {}, 500);
      }
    });
  }

  onExpand = () => {
    this.setState({
      autoExpandParent: false,
    });
  };

  save = e => {
    e.preventDefault();
    const {
      form: { validateFieldsAndScroll },
      dispatch,
      paramset: { data },
    } = this.props;
    const { areaId, areaName, corpId, corpName } = this.state;
    validateFieldsAndScroll((err, values) => {
      if (!err) {
        const insOperParamDftList = [];
        const accuOperParamDftList = [];
        if (values.insOperParamDftList) {
          Object.entries(values.insOperParamDftList).forEach(item => {
            insOperParamDftList.push(item[1]);
          });
        }
        if (values.accuOperParamDftList) {
          Object.entries(values.accuOperParamDftList).forEach(item => {
            accuOperParamDftList.push(item[1]);
          });
        }
        if (areaId) {
          dispatch({
            type: 'paramset/saveParam',
            payload: {
              ...values,
              areaId,
              areaName,
              corpId,
              corpName,
              vno: data.vno,
              insUnifyFlag: data.insUnifyFlag,
              paramId: data.paramId,
              insOperParamDftList,
              accuOperParamDftList,
              autoDeclFlag: '2',
              insBillGenDate: '1',
              insBillGenPlcy: '1',
              accuBillGenDate: '2',
              accuBillGenPlcy: '2',
            },
            callback: res => {
              dispatch({
                type: 'paramset/fetchInfo',
                payload: {
                  areaId: res.areaId,
                  corpId: res.corpId,
                },
              });
            },
          });
        } else {
          message.warning('温馨提示：请选择地区再配置！');
        }
      }
    });
  };

  // 获取树形数据
  getTreeData = (isLeaf, params) => {
    const { dispatch } = this.props;

    dispatch({
      type: 'paramset/fetchAreaList',
      payload: { params, isLeaf },
    });
  };

  onLoadData = treeNode => {
    const corpId = treeNode.props.dataRef.key;
    const corpName = treeNode.props.dataRef.companyName;
    return new Promise(resolve => {
      this.getTreeData(true, { corpId, corpName });
      setTimeout(() => {
        resolve();
      }, 500);
    });
  };

  autoOnChange = value => {
    const { dispatch } = this.props;
    dispatch({
      type: 'paramset/autoChange',
      payload: { autoDeclFlag: value.target.value },
    });
  };

  validFunction = (rule, value, callback) => {
    const newValue = Number(value);
    if (value === '') {
      return callback('请输入1到31之间的数字');
    }
    if (Number.isNaN(newValue)) {
      return callback('请输入1到31之间的数字');
    }
    if (newValue > 31 || newValue < 1) {
      return callback('请输入1到31之间的数字');
    }
    return callback(); // 校验通过
  };

  onSelect = (selectedKeys, info) => {
    if (info.node.props.dataRef.dataInfo) {
      const {
        dispatch,
        form,
        paramset: {
          pageData: { pagination },
        },
      } = this.props;
      const { areaId, corpId, areaName, corpName } = info.node.props.dataRef;
      this.setState({
        disSave: false,
        areaId,
        corpId,
        areaName,
        corpName,
        defaultkey: selectedKeys,
      });
      form.resetFields();
      dispatch({
        type: 'paramset/fetchInfo',
        payload: {
          areaId,
          corpId,
        },
      });
      dispatch({
        type: 'paramset/fetchAss',
        payload: {
          areaId,
        },
      });
      this.getMkuPayPlcyList(pagination.currentPage, pagination.pageSize, corpId, areaId);
    } else {
      this.setState({
        disSave: true,
      });
    }
  };

  // 查询补缴
  getMkuPayPlcyList = (currentPage = 1, pageSize = 10, corpId, areaId) => {
    const { dispatch } = this.props;
    dispatch({
      type: 'paramset/fetchMkupPayPlcy',
      payload: {
        pageArg: { currentPage, pageSize },
        operMkupPayPlcy: { corpId, areaId },
      },
    });
  };

  handleStandardTableChange = pagination => {
    const { corpId, areaId } = this.state;
    this.getMkuPayPlcyList(pagination.current, pagination.pageSize, corpId, areaId);
  };

  // 删除补缴
  delMkuList = record => {
    const {
      dispatch,
      paramset: {
        pageData: { pagination },
      },
    } = this.props;
    const { areaId } = this.state;
    Modal.confirm({
      icon: <QuestionCircleOutlined />,
      title: '删除',
      content: '确认删除吗？',
      okText: '确认',
      cancelText: '取消',
      onOk: () => {
        dispatch({
          type: 'paramset/fetchDeleteMkupPayPlcy',
          payload: {
            operMkupPayPlcyId: record.operMkupPayPlcyId,
            vno: record.vno,
          },
        }).then(res => {
          if (res.success) {
            this.getMkuPayPlcyList(pagination.current, pagination.pageSize, record.corpId, areaId);
          }
        });
      },
    });
  };

  handleSelectRows = (selectedRows, selectedKeys) => {
    this.setState({
      selectedRows,
      selectedRowKeys: selectedKeys,
    });
  };

  addPayment = record => {
    const { dispatch } = this.props;
    const { areaId } = this.state;
    if (areaId) {
      dispatch({
        type: 'paramset/updateModelsData',
        payload: {
          corpDictList: [],
        },
      });
      if (record) {
        dispatch({
          type: 'paramset/fetchListCorpDict',
          payload: { dictCode: 'ADD_JOIN_TYPE', pdId: record.pdId },
        });
        // 补缴基数是按历史政策
        if (record.mkupPayBaseRule && record.mkupPayBaseRule.toString() === '1') {
          this.setState({ mkupPayBaseRuleFlag: true });
        } else {
          this.setState({ mkupPayBaseRuleFlag: false });
        }
        // 补缴比例是按历史政策
        if (record.mkupPayPropRule && record.mkupPayPropRule.toString() === '1') {
          this.setState({ mkupPayPropRuleFlag: true });
        } else {
          this.setState({ mkupPayPropRuleFlag: false });
        }
        // 进位规则是按历史政策
        if (record.mkupPayCarryRule && record.mkupPayCarryRule.toString() === '1') {
          this.setState({ mkupPayCarryRuleFlag: true });
        } else {
          this.setState({ mkupPayCarryRuleFlag: false });
        }
      }
      dispatch({
        type: 'paramset/updateModelsData',
        payload: {
          mkuRecord: record || {},
          addModVisible: true,
        },
      });
    } else {
      message.warning('先选择地区');
    }
  };

  handleOk = () => {
    const { form, dispatch } = this.props;
    form.validateFields(
      [
        'addType',
        'ass',
        'mkupPayBaseRule',
        'mkupPayCarryRule',
        'mkupPayMthLwrLmt',
        'mkupPayMthRule',
        'mkupPayMth',
        'mkupPayPropRule',
        'mkupPayCorpProp',
        'mkupPayEmpProp',
        'mkupPayMthUprLmt',
        'mkupPayCorpBaseUprLmt',
        'mkupPayCorpBaseLwrLmt',
        'mkupPayEmpBaseUprLmt',
        'mkupPayEmpBaseLwrLmt',
        'mkupPayPropRemissionFlag',
      ],
      (err, fieldsValue) => {
        const { areaId } = this.state;
        const value = fieldsValue;
        delete value.accuOperParamDftList;
        delete value.insOperParamDftList;
        if (err) return;
        if (value.mkupPayBaseRule === '3') {
          if (Number(value.mkupPayCorpBaseLwrLmt) > Number(value.mkupPayCorpBaseUprLmt)) {
            message.warning('企业基数上限不能小于下限！');
            return;
          }
          if (Number(value.mkupPayEmpBaseLwrLmt) > Number(value.mkupPayEmpBaseUprLmt)) {
            message.warning('个人基数上限不能小于下限！');
            return;
          }
        }
        if (
          value.mkupPayMthUprLmt &&
          Number(value.mkupPayMthLwrLmt) >= Number(value.mkupPayMthUprLmt)
        ) {
          message.warning('触发条件填写不合理！');
          return;
        }
        dispatch({
          type: 'paramset/fetchSaveMkupPayPlcy',
          payload: {
            ...value,
            areaId,
            addType: value.addType === 'null' || value.addType === 100 ? null : value.addType,
          },
        });
      }
    );
  };

  handleCancel = () => {
    const { dispatch } = this.props;
    dispatch({
      type: 'paramset/updateModelsData',
      payload: { addModVisible: false },
    });
  };

  // 可补缴月数
  getMkuMath = value => {
    const {
      dispatch,
      paramset: { mkuRecord },
    } = this.props;
    dispatch({
      type: 'paramset/updateModelsData',
      payload: { mkuRecord: { ...mkuRecord, mkupPayMthRule: value } },
    });
  };

  // 补缴基数
  getMkuBase = value => {
    const {
      dispatch,
      paramset: { mkuRecord },
    } = this.props;
    if (value === '1') {
      // 选择补缴基数为按历史政策比例
      this.setState({ mkupPayBaseRuleFlag: true });
    } else {
      this.setState({ mkupPayBaseRuleFlag: false });
    }
    dispatch({
      type: 'paramset/updateModelsData',
      payload: { mkuRecord: { ...mkuRecord, mkupPayBaseRule: value } },
    });
    // }
  };

  // 补缴比例
  getMkuProp = value => {
    const {
      dispatch,
      paramset: { mkuRecord },
    } = this.props;
    if (value === '1') {
      // 选择补缴比例为按历史政策比例
      this.setState({ mkupPayPropRuleFlag: true });
    } else {
      this.setState({ mkupPayPropRuleFlag: false });
    }
    dispatch({
      type: 'paramset/updateModelsData',
      payload: { mkuRecord: { ...mkuRecord, mkupPayPropRule: value } },
    });
    this.setState({ isSelMkuProp: value === '3' });
  };

  // 进位规则
  getMkuPay = value => {
    if (value === '1') {
      // 选择进位规则为按历史政策比例
      this.setState({ mkupPayCarryRuleFlag: true });
    } else {
      this.setState({ mkupPayCarryRuleFlag: false });
    }
  };

  empData = (value, option) => {
    const { dispatch } = this.props;
    dispatch({
      type: 'paramset/fetchListCorpDict',
      payload: { dictCode: 'ADD_JOIN_TYPE', pdId: option.key },
    });
  };

  secondChange = value => {
    const { dispatch, paramset, form } = this.props;
    const { lastvalue } = paramset; // 定义一个lastvalue用于记录上次操作是五险还是一金
    const newvalue = value === '2' ? '2' : '1'; // 2：一金  1：五险
    if (newvalue !== lastvalue) {
      // 五险/一金，切换清空参保类型，重新赋值lastvalue
      form.resetFields(`addType`);
      dispatch({
        type: 'paramset/updateModelsData',
        payload: { lastvalue: newvalue },
      });
    }
  };

  render() {
    const {
      insurance,
      operSet,
      autoExpandParent,
      disSave,
      defaultkey,
      selectedRows,
      selectedRowKeys,
      isSelMkuProp,
      mkupPayBaseRuleFlag,
      mkupPayPropRuleFlag,
      mkupPayCarryRuleFlag,
    } = this.state;
    const {
      paramset,
      form: { getFieldDecorator },
      loading,
    } = this.props;
    const {
      data,
      treeData,
      dictData: { OPER_SET },
      pageData,
      mkuRecord,
      addModVisible,
      assList,
      corpDictList,
    } = paramset;
    const hei = window.screen.height;
    const renderTree = treeDatas =>
      treeDatas.map(item => {
        if (item.children) {
          return (
            <TreeNode title={item.title} key={item.key} dataRef={item}>
              {renderTree(item.children)}
            </TreeNode>
          );
        }
        return <TreeNode {...item} dataRef={item} />;
      });

    const formItemLayout2 = {
      labelCol: {
        xs: {
          span: 8,
        },
        sm: {
          span: 10,
        },

        lg: {
          span: 9,
        },
      },
      wrapperCol: {
        xs: {
          span: 16,
        },
        lg: {
          span: 15,
        },
        sm: {
          span: 14,
        },
      },
    };
    const formItemLayout1 = {
      labelCol: {
        xs: {
          span: 8,
        },
        sm: {
          span: 2,
        },
        md: {
          span: 10,
        },
        lg: {
          span: 10,
        },
        xl: {
          span: 10,
        },
      },
      wrapperCol: {
        xs: {
          span: 24,
        },
        lg: {
          span: 24,
        },
        sm: {
          span: 16,
        },
      },
    };

    const formItemLayout3 = {
      labelCol: {
        xs: {
          span: 24,
        },
        lg: {
          span: 8,
        },
        sm: {
          span: 9,
        },
      },
      wrapperCol: {
        xs: {
          span: 24,
        },
        lg: {
          span: 16,
        },
        sm: {
          span: 15,
        },
      },
    };

    const xl3 = {
      span: 4,
    };
    const lg3 = {
      span: 4,
    };
    const md3 = {
      span: 4,
    };
    const sm3 = 24;
    const colProps3 = {
      xl: xl3,
      lg: lg3,
      md: md3,
      sm: sm3,
    };

    const socBigColumns = [
      {
        title: '社保组名称',
        dataIndex: 'lsPkgName',
        align: 'center',
        width: 116,
        render: (value, row) => {
          row.operParamDftList.map(item => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(`insOperParamDftList[${item.lsPkgId}_${item.ass}][lsPkgId]`, {
                    rules: [
                      {
                        required: false,
                        message: '请选择',
                      },
                    ],
                    initialValue: item.lsPkgId,
                  })(<span />)}
                </Row>
              </FormItem>
            </div>
          ));
          return <span>{value}</span>;
        },
      },
      {
        title: '险种',
        dataIndex: 'ass',
        align: 'center',
        width: 74,
        render: (value, row) =>
          row.operParamDftList.map((item, index) => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(`insOperParamDftList[${item.lsPkgId}_${item.ass}][ass]`, {
                    rules: [
                      {
                        required: false,
                        message: '请选择',
                      },
                    ],
                    initialValue: item.ass,
                  })(<span>{item.assName}</span>)}
                </Row>
              </FormItem>
              {index !== row.operParamDftList.length - 1 ? <Divider type="horizontal" /> : null}
            </div>
          )),
      },
      {
        title: '本地客服增员',
        dataIndex: 'localDftAccoId',
        align: 'center',
        width: 240,
        render: (value, row) =>
          row.operParamDftList.map((item, index) => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(
                    `insOperParamDftList[${item.lsPkgId}_${item.ass}][localDftAccoId]`,
                    {
                      rules: [
                        {
                          required: true,
                          message: '请选择',
                        },
                      ],
                      initialValue: item.localDftAccoId,
                    }
                  )(
                    <HOCSelect placeholder="请选择" style={{ width: '100%' }}>
                      {item.dictItemList.map(itemValue => (
                        <Option key={itemValue.itemCode}>{itemValue.itemName}</Option>
                      ))}
                    </HOCSelect>
                  )}
                </Row>
              </FormItem>
              {index !== row.operParamDftList.length - 1 ? <Divider type="horizontal" /> : null}
            </div>
          )),
      },
      {
        title: '全国客服接单',
        dataIndex: 'suppDftAccoId',
        align: 'center',
        width: 240,
        render: (value, row) =>
          row.operParamDftList.map((item, index) => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(
                    `insOperParamDftList[${item.lsPkgId}_${item.ass}][suppDftAccoId]`,
                    {
                      rules: [
                        {
                          required: true,
                          message: '请选择',
                        },
                      ],
                      initialValue: item.suppDftAccoId,
                    }
                  )(
                    <HOCSelect placeholder="请选择" style={{ width: '100%' }}>
                      {item.dictItemList.map(itemValue => (
                        <Option key={itemValue.itemCode}>{itemValue.itemName}</Option>
                      ))}
                    </HOCSelect>
                  )}
                </Row>
              </FormItem>
              {index !== row.operParamDftList.length - 1 ? (
                <Divider type="horizontal" style={{ width: '100%' }} />
              ) : null}
            </div>
          )),
      },
    ];

    const accuBigColumns = [
      {
        title: '公积金组名称',
        dataIndex: 'lsPkgName',
        align: 'center',
        width: 116,
        render: (value, row) => {
          row.operParamDftList.map(item => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(`accuOperParamDftList[${item.lsPkgId}][lsPkgId]`, {
                    rules: [
                      {
                        required: false,
                        message: '请选择',
                      },
                    ],
                    initialValue: item.lsPkgId,
                  })(<span />)}
                </Row>
              </FormItem>
            </div>
          ));
          return <span>{value || '--'}</span>;
        },
      },
      {
        title: '险种',
        dataIndex: 'accuOperParamDftList',
        align: 'center',
        width: 74,
        render: (value, row) =>
          row.operParamDftList.map((item, index) => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(`accuOperParamDftList[${item.lsPkgId}][ass]`, {
                    rules: [
                      {
                        required: false,
                        message: '请选择',
                      },
                    ],
                    initialValue: item.ass,
                  })(<span>{item.assName}</span>)}
                </Row>
              </FormItem>
              {index !== row.operParamDftList.length - 1 ? <Divider type="horizontal" /> : null}
            </div>
          )),
      },
      {
        title: '本地客服增员',
        dataIndex: 'localDftAccoId',
        align: 'center',
        width: 240,
        render: (value, row) =>
          row.operParamDftList.map((item, index) => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(`accuOperParamDftList[${item.lsPkgId}][localDftAccoId]`, {
                    rules: [
                      {
                        required: true,
                        message: '请输入',
                      },
                    ],
                    initialValue: item.localDftAccoId,
                  })(
                    <HOCSelect placeholder="请选择" style={{ width: '100%' }}>
                      {item.dictItemList.map(itemValue => (
                        <Option key={itemValue.itemCode}>{itemValue.itemName}</Option>
                      ))}
                    </HOCSelect>
                  )}
                </Row>
              </FormItem>
              {index !== row.operParamDftList.length - 1 ? <Divider type="horizontal" /> : null}
            </div>
          )),
      },
      {
        title: '全国客服接单',
        dataIndex: 'suppDftAccoId',
        align: 'center',
        width: 240,
        render: (value, row) =>
          row.operParamDftList.map((item, index) => (
            <div>
              <FormItem>
                <Row>
                  {getFieldDecorator(`accuOperParamDftList[${item.lsPkgId}][suppDftAccoId]`, {
                    rules: [
                      {
                        required: true,
                        message: '请输入',
                      },
                    ],
                    initialValue: item.suppDftAccoId,
                  })(
                    <HOCSelect placeholder="请选择" style={{ width: '100%' }}>
                      {item.dictItemList.map(itemValue => (
                        <Option key={itemValue.itemCode}>{itemValue.itemName}</Option>
                      ))}
                    </HOCSelect>
                  )}
                </Row>
              </FormItem>
              {index !== row.operParamDftList.length - 1 ? (
                <Divider type="horizontal" style={{ width: '100%' }} />
              ) : null}
            </div>
          )),
      },
    ];

    const paymentColumns = [
      {
        title: '险种',
        dataIndex: 'assName',
        width: 140,
      },
      {
        title: '参保类型',
        dataIndex: 'addTypeName',
        width: 240,
      },
      {
        title: '可补缴月数',
        dataIndex: 'mkupPayMths',
        width: 260,
      },
      {
        title: '补缴基数',
        dataIndex: 'mkupPayBase',
        width: 240,
      },
      {
        title: '补缴比例',
        dataIndex: 'mkupPayProp',
        width: 240,
      },
      {
        title: '进位规则',
        dataIndex: 'mkupPayCarryRuleName',
        width: 240,
      },
      {
        title: '是否享受减免政策',
        dataIndex: 'mkupPayPropRemissionFlagName',
        width: 240,
        render: val => (val && val) || '--',
      },
      {
        title: '补缴规则触发条件',
        dataIndex: 'mkupPayMthLwr',
        width: 240,
      },
      {
        title: '操作',
        dataIndex: 'operation',
        align: 'center',
        width: 240,
        render: (text, record) => (
          <div>
            <span
              style={{ color: '#1890FF', cursor: 'pointer' }}
              onClick={() => {
                this.addPayment(record);
              }}
            >
              修改
            </span>
            <Divider type="vertical" />
            <span
              style={{ color: '#1890FF', cursor: 'pointer' }}
              onClick={() => {
                this.delMkuList(record);
              }}
            >
              删除
            </span>
          </div>
        ),
      },
    ];

    const modalsLayout1 = {
      labelCol: {
        xs: {
          span: 9,
        },
      },
      wrapperCol: {
        xs: {
          span: 5,
        },
      },
    };
    const modalsLayout2 = {
      labelCol: {
        xs: {
          span: 9,
        },
      },
      wrapperCol: {
        xs: {
          span: 15,
        },
      },
    };
    const modalsLayout3 = {
      labelCol: {
        xs: {
          span: 9,
        },
      },
      wrapperCol: {
        xs: {
          span: isSelMkuProp ? 10 : 15,
        },
      },
    };

    const modalSpan = 24;
    return (
      <PageHeaderWrapper>
        <div>
          <Layout>
            <div className={styles.setSider}>
              <Sider style={{ background: '#fff', width: 274, height: hei }}>
                <div className={styles.setTree} style={{ height: hei }}>
                  {loading ? (
                    <div style={{ textAlign: 'center' }}>
                      <LoadingOutlined /> 加载中{' '}
                    </div>
                  ) : (
                    <Tree
                      showLine
                      onSelect={this.onSelect}
                      loadData={this.onLoadData}
                      selectedKeys={defaultkey}
                      autoExpandParent={autoExpandParent}
                    >
                      {renderTree(treeData)}
                    </Tree>
                  )}
                </div>
              </Sider>
            </div>
            <div className={styles.contentBody}>
              <Content>
                <h3 style={{ margin: '0', fontSize: 14, fontWeight: 'bolder' }}>申报截止日</h3>
                <Divider style={{ margin: '13px 0 12px' }} />
                <Row />
                <Form>
                  <Row>
                    <Col span={24} offset={0}>
                      <FormItem>
                        {Number(data.insUnifyFlag) === 2 ? (
                          insurance.map(item => (
                            // 五险循环
                            <Row gutter={48}>
                              <Col span={12}>
                                <FormItem {...formItemLayout1} key={item.id}>
                                  <span>{item.value}</span>
                                  {getFieldDecorator(item.id, {
                                    rules: [
                                      {
                                        validator: this.validFunction,
                                      },
                                    ],
                                    initialValue: data[item.id] || undefined,
                                  })(<Input addonBefore="每月" addonAfter="日" />)}
                                </FormItem>
                              </Col>
                              <Col span={12}>
                                <FormItem {...formItemLayout1} key={item.id}>
                                  {item.idDedu}
                                  {getFieldDecorator(item.valueDedu, {
                                    rules: [
                                      {
                                        validator: this.validFunction,
                                      },
                                    ],
                                    initialValue: data[item.valueDedu] || undefined,
                                  })(<Input addonBefore="每月" addonAfter="日" />)}
                                </FormItem>
                              </Col>
                            </Row>
                          ))
                        ) : (
                          <Row gutter={48}>
                            <Col span={12}>
                              <FormItem {...formItemLayout1}>
                                社保增员截止日
                                {getFieldDecorator('insAddEndDate', {
                                  rules: [
                                    {
                                      validator: this.validFunction,
                                    },
                                  ],
                                  initialValue: data.insAddEndDate,
                                })(
                                  <Input
                                    addonBefore="每月"
                                    addonAfter="日"
                                    style={{ width: '100%' }}
                                  />
                                )}
                              </FormItem>
                            </Col>
                            <Col span={12}>
                              <FormItem {...formItemLayout1}>
                                社保减员截止日
                                {getFieldDecorator('insDeduEndDate', {
                                  rules: [
                                    {
                                      validator: this.validFunction,
                                    },
                                  ],
                                  initialValue: data.insDeduEndDate,
                                })(
                                  <Input
                                    addonBefore="每月"
                                    addonAfter="日"
                                    style={{ width: '100%' }}
                                  />
                                )}
                              </FormItem>
                            </Col>
                          </Row>
                        )}
                        <Row gutter={48}>
                          <Col span={12}>
                            <FormItem {...formItemLayout1}>
                              公积金增员截止日
                              {getFieldDecorator('accuAddEndDate', {
                                rules: [
                                  {
                                    validator: this.validFunction,
                                  },
                                ],
                                initialValue: data.accuAddEndDate,
                              })(<Input addonBefore="每月" addonAfter="日" />)}
                            </FormItem>
                          </Col>
                          <Col span={12}>
                            <FormItem {...formItemLayout1}>
                              公积金减员截止日
                              {getFieldDecorator('accuDeduEndDate', {
                                rules: [
                                  {
                                    validator: this.validFunction,
                                  },
                                ],
                                initialValue: data.accuDeduEndDate,
                              })(<Input addonBefore="每月" addonAfter="日" />)}
                            </FormItem>
                          </Col>
                        </Row>
                      </FormItem>
                    </Col>
                  </Row>
                  <h3 style={{ margin: '0', fontSize: 14, fontWeight: 'bolder' }}>默认大库设置</h3>
                  <Divider style={{ margin: '13px 0 12px' }} />
                  <Row>
                    <Col span={24} offset={0}>
                      <FormItem>
                        <Row>
                          <Col span={24} offset={0}>
                            <Row>
                              <Table
                                columns={socBigColumns}
                                dataSource={data.newIOPDDList}
                                bordered
                                pagination={false}
                                rowKey="lsPkgId"
                                style={{ width: '100%' }}
                              />
                            </Row>
                            <Row style={{ marginTop: 20 }}>
                              <Table
                                columns={accuBigColumns}
                                dataSource={data.newAOPDDList}
                                bordered
                                pagination={false}
                                rowKey="lsPkgId"
                                style={{ width: '100%' }}
                              />
                            </Row>
                          </Col>
                        </Row>
                      </FormItem>
                    </Col>
                  </Row>
                  {/* 单双流 */}
                  <h3 style={{ margin: '0', fontSize: 14, fontWeight: 'bolder' }}>单双流设置</h3>
                  <Divider style={{ margin: '13px 0 12px' }} />
                  <Row>
                    <FormItem {...formItemLayout3}>
                      {Number(data.insUnifyFlag) === 2 ? (
                        <div>
                          {operSet.map(item => (
                            <Row key={item.id}>
                              <Col span={12}>
                                <FormItem {...formItemLayout2} label={item.value}>
                                  <Row>
                                    {getFieldDecorator(item.prop, {
                                      rules: [
                                        {
                                          required: true,
                                          message: '请选择',
                                        },
                                      ],
                                      initialValue: data[item.prop] ? `${data[item.prop]}` : '1',
                                    })(
                                      <RadioGroup {...colProps3}>
                                        {OPER_SET.map(value => (
                                          <Radio value={value.itemCode} key={item.id}>
                                            {value.itemName}
                                          </Radio>
                                        ))}
                                      </RadioGroup>
                                    )}
                                  </Row>
                                </FormItem>
                              </Col>
                            </Row>
                          ))}
                        </div>
                      ) : (
                        <Row>
                          <Col span={12}>
                            <FormItem {...formItemLayout2} label="社保设置">
                              {getFieldDecorator('insSet', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请选择',
                                  },
                                ],
                                initialValue: data.insSet ? `${data.insSet}` : '1',
                              })(
                                <RadioGroup>
                                  {OPER_SET.map(item => (
                                    <Radio value={item.itemCode} key={item.id}>
                                      {item.itemName}
                                    </Radio>
                                  ))}
                                </RadioGroup>
                              )}
                            </FormItem>
                          </Col>
                        </Row>
                      )}
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout2} label="公积金设置">
                            {getFieldDecorator('accuSet', {
                              rules: [
                                {
                                  required: true,
                                  message: '请选择',
                                },
                              ],
                              initialValue: data.accuSet ? `${data.accuSet}` : '1',
                            })(
                              <RadioGroup>
                                {OPER_SET.map(item => (
                                  <Radio value={item.itemCode} key={item.id}>
                                    {item.itemName}
                                  </Radio>
                                ))}
                              </RadioGroup>
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                    </FormItem>
                  </Row>
                  <Row style={{ padding: '24px 0', lineHeight: 1.5, fontSize: 14 }}>
                    <div style={{ paddingBottom: 5, color: '#787878' }}>注：</div>
                    <Col>
                      <span style={{ color: '#787878' }}>
                        单流指客服增员后数据首先流转到员工服务，员工服务办理完成后才流转到运行；双流指客服增员后数据同时流向员工服务和运行。双流一般只建议针对特定险种设置，不建议针对五险都设置双流。
                      </span>
                    </Col>
                  </Row>
                  {/* 单双流 */}

                  {/* 暂时隐藏 不可删除 */}
                  {/* <Row>
                  <Col span={24} offset={0}>
                    <FormItem {...formItemLayout} label="是否自动申报">
                      <Row>
                        <Col span={14} offset={0}>
                          {getFieldDecorator('autoDeclFlag', {
                            rules: [
                              {
                                required: true,
                                message: '请输入',
                              },
                            ],
                            initialValue: data.autoDeclFlag ? `${data.autoDeclFlag}` : null, // 转成字符串
                          })(
                            <RadioGroup onChange={this.autoOnChange} style={{ marginLeft: '20px' }}>
                              {YES_NO_FLAG.map((value, index) => (
                                <Radio value={value.itemCode} key={index}>
                                  {value.itemName}
                                </Radio>
                              ))}
                            </RadioGroup>
                          )}
                        </Col>
                      </Row>
                    </FormItem>
                  </Col>
                </Row>

                {Number(data.autoDeclFlag) === 1 && (
                  <Row>
                    <Col span={24} offset={0}>
                      <FormItem {...formItemLayout} label={<span>网上申报时间</span>}>
                        {Number(data.insUnifyFlag) === 2 ? ( // 不是五险合一，自动申报
                          <div>
                            <Row>
                              <Col {...colProps7}>
                                生育
                                <span style={{ marginLeft: 18 }}>每月</span>
                                {getFieldDecorator('birthAutoDeclDate', {
                                  rules: [
                                    {
                                      required: true,
                                      message: '请输入',
                                    },
                                  ],
                                  initialValue: data.birthAutoDeclDate,
                                })(
                                  <InputNumber min={1} max={31} onChange={this.birthAutoChange} />
                                )}
                                <span>日</span>
                              </Col>
                            </Row>
                            <Row>
                              <Col {...colProps7}>
                                养老
                                <span style={{ marginLeft: 18 }}> 每月</span>
                                {getFieldDecorator('pensAutoDeclDate', {
                                  rules: [
                                    {
                                      required: true,
                                      message: '请输入',
                                    },
                                  ],
                                  initialValue: data.pensAutoDeclDate,
                                })(
                                  <InputNumber min={1} max={31} onChange={this.pensionAutoChange} />
                                )}
                                <span>日</span>
                              </Col>
                            </Row>
                            <Row>
                              <Col {...colProps7}>
                                医疗
                                <span style={{ marginLeft: 18 }}>每月</span>
                                {getFieldDecorator('medAutoDeclDate', {
                                  rules: [
                                    {
                                      required: true,
                                      message: '请输入',
                                    },
                                  ],
                                  initialValue: data.medAutoDeclDate,
                                })(<InputNumber min={1} max={31} onChange={this.medAutoChange} />)}
                                <span>日</span>
                              </Col>
                            </Row>
                            <Row>
                              <Col {...colProps7}>
                                工伤
                                <span style={{ marginLeft: 18 }}>每月</span>
                                {getFieldDecorator('injAutoDeclDate', {
                                  rules: [
                                    {
                                      required: true,
                                      message: '请输入',
                                    },
                                  ],
                                  initialValue: data.injAutoDeclDate,
                                })(<InputNumber min={1} max={31} onChange={this.injAutoChange} />)}
                                <span>日</span>
                              </Col>
                            </Row>
                            <Row>
                              <Col {...colProps7}>
                                失业
                                <span style={{ marginLeft: 18 }}>每月</span>
                                {getFieldDecorator('unempAutoDeclDate', {
                                  rules: [
                                    {
                                      required: true,
                                      message: '请输入',
                                    },
                                  ],
                                  initialValue: data.unempAutoDeclDate,
                                })(
                                  <InputNumber min={1} max={31} onChange={this.unempAutoChange} />
                                )}
                                <span>日</span>
                              </Col>
                            </Row>
                          </div>
                        ) : (
                          <Row>
                            <Col {...colProps7}>
                              社保
                              <span style={{ marginLeft: 18 }}>每月</span>
                              {getFieldDecorator('insAutoDeclDate', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请输入',
                                  },
                                ],
                                initialValue: data.insAutoDeclDate,
                              })(<InputNumber min={1} max={31} onChange={this.insAutoChange} />)}
                              <span>日</span>
                            </Col>
                          </Row>
                        )}
                        <Row>
                          <Col {...colProps7}>
                            公积金
                            <span style={{ marginLeft: 6 }}>每月</span>
                            {getFieldDecorator('accuAutoDeclDate', {
                              rules: [
                                {
                                  required: true,
                                  message: '请输入',
                                },
                              ],
                              initialValue: data.accuAutoDeclDate,
                            })(<InputNumber min={1} max={31} onChange={this.accuAutoChange} />)}
                            <span>日</span>
                          </Col>
                        </Row>
                      </FormItem>
                    </Col>
                  </Row>
                )} */}

                  {/* <Divider type="horizontal" dashed />
                <Row>
                  <Col span={24} offset={0}>
                    <FormItem {...formItemLayout} label="账单生成规则">
                      <Row>
                        <Col {...colProps4}>
                          <span>
                            社保账单:<span style={{ marginLeft: 16 }}>每月</span>
                          </span>
                          {getFieldDecorator('insBillGenDate', {
                            rules: [
                              {
                                required: false,
                              },
                            ],
                            initialValue: data.insBillGenDate,
                          })(<InputNumber min={1} max={31} />)}
                          <span>日</span>
                        </Col>
                        <Col {...colProps4}>
                          {getFieldDecorator('insBillGenPlcy', {
                            rules: [
                              {
                                required: false,
                              },
                            ],
                            initialValue: data.insBillGenPlcy ? `${data.insBillGenPlcy}` : '1',
                          })(
                            <Select>
                              {BILL_GEN_PLCY.map((value, index) => (
                                <Option value={value.itemCode} key={index}>
                                  {value.itemName}
                                </Option>
                              ))}
                            </Select>
                          )}
                        </Col>
                      </Row>
                      <Row>
                        <Col {...colProps4}>
                          <span>公积金账单:每月</span>
                          {getFieldDecorator('accuBillGenDate', {
                            rules: [
                              {
                                required: false,
                              },
                            ],
                            initialValue: data.accuBillGenDate,
                          })(<InputNumber min={1} max={31} />)}{' '}
                          <span>日</span>
                        </Col>
                        <Col {...colProps4}>
                          {getFieldDecorator('accuBillGenPlcy', {
                            rules: [
                              {
                                required: false,
                              },
                            ],
                            initialValue: data.accuBillGenPlcy ? `${data.accuBillGenPlcy}` : '1',
                          })(
                            <Select>
                              {BILL_GEN_PLCY.map((value, index) => (
                                <Option value={value.itemCode} key={index}>
                                  {value.itemName}
                                </Option>
                              ))}
                            </Select>
                          )}
                        </Col>
                      </Row>
                    </FormItem>
                  </Col>
                </Row> */}
                  <h3 style={{ margin: '0', fontSize: 14, fontWeight: 'bolder' }}>补缴规则</h3>
                  <Divider style={{ margin: '13px 0 12px' }} />
                  <Row style={{ marginBottom: 16 }}>
                    {/* <Authorized authority="mgr:rcrdSerTypeApi:insertRcrdSerType" noMatch={null}> */}
                    <Button
                      type="primary"
                      style={{ marginRight: 20 }}
                      onClick={() => this.addPayment()}
                    >
                      <PlusOutlined />
                      新增
                    </Button>
                    {/* </Authorized> */}
                  </Row>
                  <StandardTable
                    selectedRows={selectedRows}
                    selectedRowKeys={selectedRowKeys}
                    data={pageData}
                    columns={paymentColumns}
                    rowKey={record => record.operMkupPayPlcyId}
                    // loading={rsgnRsnloading}
                    onSelectRow={this.handleSelectRows}
                    onChange={this.handleStandardTableChange}
                  />
                  {addModVisible ? (
                    <Modal
                      visible
                      onOk={this.handleOk}
                      onCancel={this.handleCancel}
                      title={mkuRecord.operMkupPayPlcyId ? '修改' : '添加'}
                      okText="确认"
                      destroyOnClose
                    >
                      <Form className={styles.paramSetError}>
                        <Row span={modalSpan}>
                          <Col span={18}>
                            <FormItem {...modalsLayout2} label={<span>险种 </span>}>
                              {getFieldDecorator('ass', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请选择',
                                  },
                                ],
                                initialValue: mkuRecord.ass && mkuRecord.ass.toString(),
                              })(
                                <HOCSelect
                                  placeholder="请选择"
                                  style={{ width: '100%' }}
                                  showSearch
                                  onChange={this.secondChange}
                                  optionFilterProp="children"
                                  showArrow={false}
                                  onSelect={this.empData}
                                >
                                  {assList.map(item => (
                                    <Option value={item.itemCode} key={item.pdId}>
                                      {item.itemName}
                                    </Option>
                                  ))}
                                </HOCSelect>
                              )}
                            </FormItem>
                          </Col>
                        </Row>
                        <Row span={modalSpan}>
                          <Col span={18}>
                            <FormItem {...modalsLayout2} label={<span>参保类型 </span>}>
                              {getFieldDecorator('addType', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请选择',
                                  },
                                ],
                                initialValue:
                                  mkuRecord.addType === 100
                                    ? 'null'
                                    : mkuRecord.addType && mkuRecord.addType.toString(),
                              })(
                                <HOCSelect
                                  placeholder="请选择"
                                  style={{ width: '100%' }}
                                  showSearch
                                  optionFilterProp="children"
                                  showArrow={false}
                                >
                                  {corpDictList.map(item => (
                                    <Option value={item.itemCode}>{item.itemName}</Option>
                                  ))}
                                </HOCSelect>
                              )}
                            </FormItem>
                          </Col>{' '}
                        </Row>
                        <Row span={modalSpan}>
                          <Col span={18}>
                            <FormItem {...modalsLayout2} label={<span>可补缴月数 </span>}>
                              {getFieldDecorator('mkupPayMthRule', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请输入',
                                  },
                                ],
                                initialValue:
                                  mkuRecord.mkupPayMthRule && mkuRecord.mkupPayMthRule.toString(),
                              })(
                                <DictCode
                                  allowClear
                                  showSearch
                                  filterOption={(input, option) =>
                                    option.props.children
                                      .toLowerCase()
                                      .indexOf(input.toLowerCase()) >= 0
                                  }
                                  dictType="MKUP_PAY_MTH_RULE"
                                  style={{ width: '100%' }}
                                  onSelect={this.getMkuMath}
                                />
                              )}
                            </FormItem>
                          </Col>
                          {mkuRecord.mkupPayMthRule && +mkuRecord.mkupPayMthRule !== 3 && (
                            <Col span={3}>
                              <FormItem>
                                {getFieldDecorator('mkupPayMth', {
                                  rules: [
                                    {
                                      required: true,
                                      message: '请输入',
                                    },
                                  ],
                                  initialValue: mkuRecord.mkupPayMth,
                                })(<InputNumber min={0} max={9999} placeholder="请输入" />)}
                              </FormItem>
                            </Col>
                          )}
                        </Row>
                        <Row span={modalSpan}>
                          <Col span={18}>
                            <FormItem {...modalsLayout2} label={<span>补缴基数 </span>}>
                              {getFieldDecorator('mkupPayBaseRule', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请选择',
                                  },
                                ],
                                initialValue:
                                  mkuRecord.mkupPayBaseRule && mkuRecord.mkupPayBaseRule.toString(),
                              })(
                                <DictCode
                                  allowClear
                                  showSearch
                                  filterOption={(input, option) =>
                                    option.props.children
                                      .toLowerCase()
                                      .indexOf(input.toLowerCase()) >= 0
                                  }
                                  dictType="MKUP_PAY_BASE_RULE"
                                  style={{ width: '100%' }}
                                  onSelect={this.getMkuBase}
                                />
                              )}
                            </FormItem>
                          </Col>
                        </Row>
                        {mkuRecord.mkupPayBaseRule && +mkuRecord.mkupPayBaseRule === 3 && (
                          <Fragment>
                            <Row span={modalSpan}>
                              <Col span={18}>
                                <FormItem {...modalsLayout2} label={<span>企业基数 </span>}>
                                  {getFieldDecorator('mkupPayCorpBaseUprLmt', {
                                    rules: [
                                      {
                                        required: true,
                                        message: '请输入',
                                      },
                                    ],
                                    initialValue: mkuRecord.mkupPayCorpBaseUprLmt,
                                  })(<InputNumber min={0} max={999999.99} placeholder="上限" />)}
                                </FormItem>
                              </Col>
                              <Col span={4} pull={6}>
                                <FormItem>
                                  {getFieldDecorator('mkupPayCorpBaseLwrLmt', {
                                    rules: [
                                      {
                                        required: true,
                                        message: '请输入',
                                      },
                                    ],
                                    initialValue: mkuRecord.mkupPayCorpBaseLwrLmt,
                                  })(<InputNumber min={0} max={999999.99} placeholder="下限" />)}
                                </FormItem>
                              </Col>
                            </Row>
                            <Row span={modalSpan}>
                              <Col span={18}>
                                <FormItem {...modalsLayout2} label={<span>个人基数 </span>}>
                                  {getFieldDecorator('mkupPayEmpBaseUprLmt', {
                                    rules: [
                                      {
                                        required: true,
                                        message: '请输入',
                                      },
                                    ],
                                    initialValue: mkuRecord.mkupPayEmpBaseUprLmt,
                                  })(<InputNumber min={0} max={999999.99} placeholder="上限" />)}
                                </FormItem>
                              </Col>
                              <Col span={4} pull={6}>
                                <FormItem>
                                  {getFieldDecorator('mkupPayEmpBaseLwrLmt', {
                                    rules: [
                                      {
                                        required: true,
                                        message: '请输入',
                                      },
                                    ],
                                    initialValue: mkuRecord.mkupPayEmpBaseLwrLmt,
                                  })(<InputNumber min={0} max={999999.99} placeholder="下限" />)}
                                </FormItem>
                              </Col>
                            </Row>
                          </Fragment>
                        )}
                        <Row span={modalSpan}>
                          <Col span={18}>
                            <FormItem {...modalsLayout3} label={<span>补缴比例 </span>}>
                              {getFieldDecorator('mkupPayPropRule', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请选择',
                                  },
                                ],
                                initialValue:
                                  mkuRecord.mkupPayPropRule && mkuRecord.mkupPayPropRule.toString(),
                              })(
                                <DictCode
                                  allowClear
                                  showSearch
                                  filterOption={(input, option) =>
                                    option.props.children
                                      .toLowerCase()
                                      .indexOf(input.toLowerCase()) >= 0
                                  }
                                  dictType="MKUP_PAY_PROP_RULE"
                                  style={{ width: '100%' }}
                                  onSelect={this.getMkuProp}
                                />
                              )}
                            </FormItem>
                          </Col>
                          {+mkuRecord.mkupPayPropRule === 3 && (
                            <Fragment>
                              <Col span={2} pull={3}>
                                <FormItem>
                                  {getFieldDecorator('mkupPayCorpProp', {
                                    rules: [
                                      {
                                        required: true,
                                        message: '请输入',
                                      },
                                    ],
                                    initialValue: mkuRecord.mkupPayCorpProp,
                                  })(<InputNumber min={0} max={100} placeholder="企业比例" />)}
                                </FormItem>
                              </Col>
                              <Col span={2}>
                                <FormItem>
                                  {getFieldDecorator('mkupPayEmpProp', {
                                    rules: [
                                      {
                                        required: true,
                                        message: '请输入',
                                      },
                                    ],
                                    initialValue: mkuRecord.mkupPayEmpProp,
                                  })(<InputNumber min={0} max={100} placeholder="个人比例" />)}
                                </FormItem>
                              </Col>
                            </Fragment>
                          )}
                        </Row>
                        <Row span={modalSpan}>
                          <Col span={18}>
                            <FormItem {...modalsLayout2} label={<span>进位规则</span>}>
                              {getFieldDecorator('mkupPayCarryRule', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请选择',
                                  },
                                ],
                                initialValue:
                                  mkuRecord.mkupPayCarryRule &&
                                  mkuRecord.mkupPayCarryRule.toString(),
                              })(
                                <DictCode
                                  allowClear
                                  showSearch
                                  filterOption={(input, option) =>
                                    option.props.children
                                      .toLowerCase()
                                      .indexOf(input.toLowerCase()) >= 0
                                  }
                                  dictType="MKUP_PAY_CARRY_RULE"
                                  style={{ width: '100%' }}
                                  onSelect={this.getMkuPay}
                                />
                              )}
                            </FormItem>
                          </Col>
                        </Row>
                        {mkupPayBaseRuleFlag && mkupPayCarryRuleFlag && mkupPayPropRuleFlag ? (
                          <Row span={modalSpan}>
                            <Col span={18}>
                              <FormItem {...modalsLayout2} label={<span>是否享受减免政策</span>}>
                                {getFieldDecorator('mkupPayPropRemissionFlag', {
                                  rules: [
                                    {
                                      required: true,
                                      message: '请选择',
                                    },
                                  ],
                                  initialValue:
                                    mkuRecord.mkupPayPropRemissionFlag &&
                                    mkuRecord.mkupPayPropRemissionFlag.toString(),
                                })(
                                  <DictCode
                                    allowClear
                                    showSearch
                                    filterOption={(input, option) =>
                                      option.props.children
                                        .toLowerCase()
                                        .indexOf(input.toLowerCase()) >= 0
                                    }
                                    dictType="MKUP_PAY_PROP_REMISSION_FLAG"
                                    style={{ width: '100%' }}
                                  />
                                )}
                              </FormItem>
                            </Col>
                          </Row>
                        ) : null}
                        <Row span={modalSpan}>
                          <Col span={18}>
                            <FormItem {...modalsLayout1} label={<span>触发条件</span>}>
                              {getFieldDecorator('mkupPayMthLwrLmt', {
                                rules: [
                                  {
                                    required: true,
                                    message: '请输入',
                                  },
                                ],
                                initialValue: mkuRecord.mkupPayMthLwrLmt,
                              })(<InputNumber min={1} max={9999} placeholder="月数" />)}
                            </FormItem>
                          </Col>
                          <Col span={4} pull={6}>
                            <FormItem>≤补缴月数&lt;</FormItem>
                          </Col>
                          <Col span={2} pull={6}>
                            <FormItem>
                              {getFieldDecorator('mkupPayMthUprLmt', {
                                rules: [
                                  {
                                    required: false,
                                    message: '请输入',
                                  },
                                ],
                                initialValue: mkuRecord.mkupPayMthUprLmt,
                              })(<InputNumber min={1} max={9999} placeholder="月数" />)}
                            </FormItem>
                          </Col>
                        </Row>
                      </Form>
                    </Modal>
                  ) : null}

                  <Row style={{ textAlign: 'center', marginBottom: '30px', marginTop: '20px' }}>
                    <Authorized authority="business:operParam:insert" noMatch={null}>
                      <Button type="primary" onClick={this.save} disabled={disSave}>
                        保存并更新
                      </Button>
                    </Authorized>
                  </Row>
                </Form>
              </Content>
            </div>
          </Layout>
        </div>
      </PageHeaderWrapper>
    );
  }
}

export default List;
